From e4de947bfdae233fc53341ba0cadeda2edd7aea9 Mon Sep 17 00:00:00 2001 From: robertl Date: Wed, 17 Nov 2004 02:45:47 +0000 Subject: [PATCH] Fix floating termination in local buffers that was randomizing dates. --- gpsbabel/coastexp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gpsbabel/coastexp.c b/gpsbabel/coastexp.c index 7f2de105b..68687d0ae 100755 --- a/gpsbabel/coastexp.c +++ b/gpsbabel/coastexp.c @@ -253,16 +253,16 @@ ce_cdata(void *dta, const XML_Char *s, int len) monthString[3] = '\0'; t.tm_mon = atoi(monthString) - 1; strncpy(dayString, currentMark->created+6, 2); - dayString[3] = '\0'; + dayString[2] = '\0'; t.tm_mday = atoi(dayString); strncpy(hourString, currentMark->created+9, 2); - hourString[3] = '\0'; + hourString[2] = '\0'; t.tm_hour = atoi(hourString); strncpy(minString, currentMark->created+11, 2); - minString[3] = '\0'; + minString[2] = '\0'; t.tm_min = atoi(minString); strncpy(secString, currentMark->created+13, 2); - secString[3] = '\0'; + secString[2] = '\0'; t.tm_sec = atoi(secString); currentMark->wp->creation_time = mktime(&t) + get_tz_offset(); } -- 2.30.2